package tank.client.game;

import java.awt.*;

/**
 * 玩家
 */
public class Hero extends Tank {

    public Hero(int x, int y,Color color) {
        super(x, y, color);
    }

    private boolean isSuperBullet = false;
    private boolean isSuperTank = false;
    private boolean isSuperHome = false;

    private int lastDirection;

    public boolean isSuperBullet() {
        return isSuperBullet;
    }

    public boolean isSuperTank() {
        return isSuperTank;
    }

    public boolean isSuperHome() {
        return isSuperHome;
    }

    @Override
    public void drawTank(Graphics g) {
        super.drawTank(g);
        if(isSuperTank){
            g.setColor(Color.YELLOW);
            g.drawOval(getX() - 30,getY() - 30,getTankWidth() + 60,getTankHeight() + 60);
        }
    }

    public void drawSelf(Graphics g) {
        drawTank(g);
        g.setColor(Color.RED);
        g.drawString("Me",this.getX() + this.getTankWidth() / 2 - 5,
                this.getY() + this.getTankHeight() / 2 - 5);
    }
}
